Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-platform support #36

Merged
merged 76 commits into from
Nov 30, 2024
Merged

Multi-platform support #36

merged 76 commits into from
Nov 30, 2024

Conversation

NoobNotFound
Copy link
Member

@NoobNotFound NoobNotFound commented Jul 8, 2024

add multi platform support (wip)

@NoobNotFound NoobNotFound requested a review from a team as a code owner July 8, 2024 13:22
@Lamparter

This comment was marked as outdated.

Copy link
Contributor

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you guys can use Directory.Build.props to remove duplicated properties among projects?

Emerald.App/Emerald.App/Emerald.App.csproj Outdated Show resolved Hide resolved
0x5bfa
0x5bfa previously approved these changes Jul 12, 2024
Copy link
Contributor

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, it looks ok!

This is one of the reasons that UWP is better 😭
I remember multi-platform support was so easy...

WinAppSdk is more desktop app like. I feel you pain as we’ve used it in FluentHub.

@NoobNotFound
Copy link
Member Author

This is one of the reasons that UWP is better 😭 I remember multi-platform support was so easy...

yeah I agree to @0x5bfa this was UWP at the first (SD Launcher) but it was so difficult to even a run a single Minecraft version because accessing resources is limited. This originally created the option 'Run Minecraft As Admin' because it would solve it at some kind of security risk

@NoobNotFound
Copy link
Member Author

NoobNotFound commented Jul 13, 2024

btw I planned to rewrite the Emerald.Core to Emerald.CoreX with a well (i'll try my best) organized code pattern so it would be easy to maintain.
I was away from the dev for kind of a time so I don't even understand somethings I have written before lol.

And I'll mostly focused on bringing Emerald for MacOS but emerald for Linux will be also created since I hope to use single framework for all.
Emerald for Windows works with no problem at all so I think it'll be a mess to replace Core with CoreX in Emerald.WinUI

BTW what do you guys think should I use for emerald cross platform?
would it be

  • MAUI
  • MAUI Hybrid (Blazor based MAUI app)
  • Blazor with Something like PWA or electron to create a desktop like (idk even this is possible at all lol)
  • Uno Platform
  • Or something else (Because I think all of these are not just perfect as native WinUI and apple UI (idk whatever they call it)

@RiversideValley/emerald what do you think?

@Lamparter
Copy link
Member

@RiversideValley/emerald what do you think?

Okay.....
So first things first. In terms of cross-platform, Uno seems like the best way to go as it is the most mature multi platform runtime engine. Blazor/Electron/ASP.NET apps are literally terrible and I wouldn't recommend them in a billion years as they are slow and buggy and the codebase is just messy - desktop apps shouldn't programmed in the same way as websites in my opinion. Plus, ASP.Net Core/Blazor/Electron apps are limited to most OS permission scopes as a website and may be able to open it but wouldn't function as a launcher in the same way that the Minecraft Launcher/Natsurainko.FluentLauncher/Lunar/Badlion/(whatever launchers are being used nowawadays) in terms of being actually able to manage the game on demand - you might as well be developing Emerald as a website that just launches Minecraft via protocols which betrays the true meaning behind what a Minecraft Launcher really is.
Emerald for macOS, on the other hand, will be difficult. I'm not sure whether .NET desktop apps designed and managed by Uno are even supported on macOS.
Then again, this leads me to question, why do we want Emerald to work as a cross-platform app? It's fine to make it universally available across different Windows versions (AMD64, Arm, Arm64, WinRT, etc.) but why do we really want it to function on different platforms? Minecraft on macOS is the only comparable version of the game to that of Windows and I am to suppose that we will have very little userbase who are interested in a Cupertino UI (what Apple's design system is called) Minecraft Launcher that lacks the features or core contributors of other major competitors or even the default Launcher itself? On top of that, Minecraft for Linux is incredibly underdeveloped and resembles Classic Minecraft in its entirety - not a proper game as Minecraft on Windows and macOS appears to be.
Another thing - codebase unifier platforms like Uno and MAUI generally lean towards having a single codebase as that is literally the meaning of the word Uno - it makes no sense to have a separate project for each version as all the apps being able to be built from a singular codebase is the very nature of Uno and MAUI in the first place.
All in all, this is merely speculative but it really does make me question what Emerald really is.

@NoobNotFound
Copy link
Member Author

Okay..... So first things first. In terms of cross-platform, Uno seems like the best way to go as it is the most mature multi platform runtime engine. Blazor/Electron/ASP.NET apps are literally terrible and I wouldn't recommend them in a billion years as they are slow and buggy and the codebase is just messy - desktop apps shouldn't programmed in the same way as websites in my opinion.

Yeah I do also prefer Uno over the others, Just listed down the possible ways of doing this. And also, I have never tried either Uno or Blazor with electron(ized) before. So I may need time to get these thing well.

Plus, ASP.Net Core/Blazor/Electron apps are limited to most OS permission scopes as a website and may be able to open it but wouldn't function as a launcher in the same way that the Minecraft Launcher/Natsurainko.FluentLauncher/Lunar/Badlion/(whatever launchers are being used nowawadays) in terms of being actually able to manage the game on demand - you might as well be developing Emerald as a website that just launches Minecraft via protocols which betrays the true meaning behind what a Minecraft Launcher really is.

Just to mention, ig some of the popular (legal or cracked) minecraft launchers like TLauncher, Lunarclient uses HTML UI with Java (I'm not sure since I haven't observed any Java based app before, but I think it works like that)

I don't like Electron\Blazor UI based apps because of the performance. The only thing I like about it is we can craft whatever unique UI we want with HTML and CSS (although I'm not a web designer lol)

Emerald for macOS, on the other hand, will be difficult. I'm not sure whether .NET desktop apps designed and managed by Uno are even supported on macOS.

There is some built with Uno for macOS, like Devtoys, Ryujinx (An amazing project I found when searching for emulators, not so sure whether it is poweren by Uno)

Then again, this leads me to question, why do we want Emerald to work as a cross-platform app? It's fine to make it universally available across different Windows versions (AMD64, Arm, Arm64, WinRT, etc.) but why do we really want it to function on different platforms?

well Minecraft JAVA Edition is cross-platform, so why not emerald?
Actually I like to bring emerald for macOS since I have a mac tbh.

Minecraft on macOS is the only comparable version of the game to that of Windows and I am to suppose that we will have very little userbase who are interested in a Cupertino UI (what Apple's design system is called)

Yeah I agree, but I have experienced that annoying user experience when I try to install 3rd party MC launcher on my new mac.
I had to manually install Java runtime, finding the correct runtime could be challenging not to me but to other normal non-dev peoples like my younger brother who only knows to open emerald and launch minecraft.
Since CMLLib automatically installs required java rumtime which is very easy for normal users.

Minecraft Launcher that lacks the features or core contributors of other major competitors or even the default Launcher itself? On top of that, Minecraft for Linux is incredibly underdeveloped and resembles Classic Minecraft in its entirety - not a proper game as Minecraft on Windows and macOS appears to be.

I had only a linux based device before (Which actually came with windows but had to install a linux because it was too old for Windows). I played Minecraft on that device using Tlauncher, I was happy with it. (even though the performence was not so great)
I think Emerald would easily work if it was cross platform thanks to the well-written CMLLib.

Another thing - codebase unifier platforms like Uno and MAUI generally lean towards having a single codebase as that is literally the meaning of the word Uno - it makes no sense to have a separate project for each version as all the apps being able to be built from a singular codebase is the very nature of Uno and MAUI in the first place. All in all, this is merely speculative but it really does make me question what Emerald really is.

yeah, so do I 😀. Emerald is just a UI for some "custom minecraft launcher" Libraires. made for easy of use, easily download mods using Modrinth API and install and run moded MC version just like TLauncher.

btw what would be the final decision? what about. MAUI? actually I really don't love any of these, I would rather build a native mac app if I knew SwiftUI

@NoobNotFound
Copy link
Member Author

wow Ive written a whole essay lol

@Lamparter

This comment was marked as off-topic.

@Lamparter

This comment was marked as off-topic.

@Lamparter

This comment was marked as outdated.

@Lamparter
Copy link
Member

Also, I just remembered, MAUI doesn't support Linux so it wouldn't work that way anyway

Signed-off-by: Lamparter <[email protected]>
Signed-off-by: Lamparter <[email protected]>
Finally!

Signed-off-by: Lamparter <[email protected]>
@Lamparter Lamparter marked this pull request as draft July 14, 2024 17:46
Signed-off-by: Lamparter <[email protected]>
@Lamparter Lamparter changed the title 🏗️ Multi-platform support Infra: Multi-platform support Nov 9, 2024
@Lamparter
Copy link
Member

@NoobNotFound let's merge, what do you think? I'll need to review this first but it'll be easier to just commit to main rather than an insanely large PR.

@Lamparter Lamparter self-requested a review November 30, 2024 15:34
@Lamparter Lamparter marked this pull request as ready for review November 30, 2024 15:34
sourcery-ai[bot]

This comment was marked as spam.

@Lamparter Lamparter changed the title Infra: Multi-platform support Multi-platform support Nov 30, 2024
Lamparter
Lamparter previously approved these changes Nov 30, 2024
@Lamparter Lamparter merged commit 932d69d into main Nov 30, 2024
2 checks passed
@Lamparter Lamparter deleted the cross-platform branch November 30, 2024 16:27
Lamparter added a commit that referenced this pull request Nov 30, 2024
Co-authored-by: 0x5BFA <[email protected]>
Co-authored-by: NoobNotFound <[email protected]>
Lamparter added a commit that referenced this pull request Nov 30, 2024
Co-authored-by: 0x5BFA <[email protected]>
Co-authored-by: NoobNotFound <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Bug: Failed to initialise Minecraft path ``
4 participants